package com.snda.dw.lidejia.hdfsoverftp;

import org.apache.ftpserver.ftplet.FileSystemFactory;
import org.apache.ftpserver.ftplet.FileSystemView;
import org.apache.ftpserver.ftplet.FtpException;
import org.apache.ftpserver.ftplet.User;
import org.apache.hadoop.fs.FileSystem;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class HdfsFileSystemFactory implements FileSystemFactory {
    
    private static final Logger log = LoggerFactory.getLogger(HdfsOverFtpSystem.class);

    @Override
    public FileSystemView createFileSystemView(User user)
            throws FtpException {
        FileSystem dfs = HdfsOverFtpSystem.getDfs();
        return new HdfsFileSystemView(user, dfs);
    }
}